# TODO: 什么时候用class?
# 代码原则：尽量避免重复和冗余
class role(object):  # TODO: 为何加入"object"

    def __init__(self,name,sex,age,fight):
        """
        TODO
        :param name:
        :param sex:
        :param age:
        :param fight:
        """
        self.name=name
        self.sex=sex
        self.age=age
        self.fight=fight


    def zhandou(self):  # TODO: 不要用拼音, 尽量用英文(缩写)
        self.fight=self.fight-200

    def xiulian(self,a):
        self.fight=self.fight+100*a

    def youxi(self):
        self.fight=self.fight-300

    def detail(self):
        temp=(self.name,self.sex,self.age,self.fight)
        print(temp)


if __name__ == '__main__':
    obj1 = role('wangqiang','男',18,200)
    obj1.xiulian(3)
    obj1.detail()
